<!DOCTYPE html>
<html lang='en'>

<head>
    <meta charset='UTF-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script src='../../vue.js'></script>
</head>

<body>
    <div id='app'>
        <button @click="type=1">新闻</button>
        <button @click="type=2">电影</button>
        <button @click="type=3">娱乐</button>
        <button @click="type=4">头条</button>
        <!-- v-show也是需要接收一个boolean 决定当前元素时display：none还是block -->
        <ul v-show="type===1">
            <li>老表</li>
            <li>抽烟</li>
            <li>喝酒</li>
        </ul>
        <ul v-show="type===2">
            <li>篮球</li>
            <li>排球</li>
            <li>羽毛球</li>
        </ul>

        <ul v-show="type===3">
            <li>热干面</li>
            <li>周黑鸭</li>
            <li>酸辣粉</li>
        </ul>

        <ul v-show="type===4">
            <li>游泳</li>
            <li>健身</li>
            <li>普拉提</li>
        </ul>
    </div>
    <script>
        Vue.config.productionTip = false;
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    type:1
                }
            }
        })
    </script>
</body>

</html>